﻿using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Newtonsoft.Json;
using nhCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static Android.Bluetooth.BluetoothClass;

namespace WSYmi.MainAct
{
    [BroadcastReceiver(Enabled = true, Exported = false)]
    internal class SrvReceiver : BroadcastReceiver
    {
        private MainActivity Activity { get; set; }

        public SrvReceiver(Activity activity) : base()
        {
            Activity = (MainActivity)activity;
        }

        public SrvReceiver() : base()
        {
        }

        public override void OnReceive(Context context, Intent intent)
        {
            Activity.OnReceive(context, intent);
        }
    }

    enum EnumMessageHandler : int
    {
        None = 0,

        /// <summary>
        /// 蓝牙已连接
        /// </summary>
        BleConnected = 102,

        /// <summary>
        /// 蓝牙已断开
        /// </summary>
        BleDisconnected = 103,

        /// <summary>
        /// 不是兼容蓝牙设备
        /// </summary>
        NotBleDevice = 110,
    }
}